package com.ckk.cloud.feign.config;

import com.ckk.apicommoncloud.entity.CommonResult;
import com.ckk.apicommoncloud.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author 陈昆昆
 * @version 1.0
 * @date 2020/6/16 14:24
 */
@Component
@FeignClient(name = "CLOUD-ORDER-PROVIDER")
public interface FeiginClients {

    @GetMapping(value="/payment/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);


    @PostMapping("payment/create")
    public CommonResult create(@RequestBody Payment payment);

    @GetMapping(value = "payment/get/timeout")
    public String outTime();
}
